temp_directory


Description

This can be used to return the temporary directory created for your game each time it is run (the root does not contain the final "\"). This directory will hold files and can be accessed while the game is running, but it will be removed (along with all files that it contains) when the game is closed.

WARNING! This function may not work as you expect due to GameMaker Studio 2 being sandboxed! Please see the section on File System Limits for more information.


Syntax:

temp_directory


Returns:

String


Example:

ini_open(temp_directory + "\temp_ini.ini");

This will open an ini file in the temporary directory of the game (creating it if it does not already exist).